<?php
namespace app\common\validate;

use think\Validate;

class Buyer extends Validate
{
    protected $rule = [
        'country_id' => 'require|integer|>=:1',
        'industry_id' => 'require|integer|>=:1',
        'status' => 'require|in:0,1',
    ];

    protected $message = [
        'country_id' => '{%country_id_val}',
        'industry_id' => '{%industry_id_val}',

        'status' => '{%status_val}',
    ];

    protected $scene = [
        'add'   => ['country_id', 'industry_id', 'status'],
        'edit'  => ['country_id', 'industry_id', 'status'],
        'status' => ['status'],
    ];
}